<template>
    <div class="claify">
        <div class="title">
            <img class="back" src="../../assets/Fill 1@2.88x.png" alt="" @click="backs">
            {{navtitle}}
        </div>
        <div class="zhuan" v-for="(item,index) in result" :key="index">
            <p class="zi">{{item.sName}}</p>
            <img class="zh-img" src="../../assets/image/ic_next_grayArrow.png" @click="back" alt="">
        </div>
    </div>
</template>

<script>
import axios from 'axios'
export default {
    name:'claify',
    data(){
        return{
            navtitle:'成都康莱商贸有限公司',
            result:''
        }
    },
    methods:{
        backs(){
            this.$router.back(-1)
        },
        back(){
            this.$router.push({path:'/shopList'})
        },
        getAxios(){
            axios.post('https://web-gateway.newbeescm.com/b2b-app-web/getDealerClassByDealerId/14607',{
                headers:{
                    token: this.$store.state.token,
                    userId: this.$store.state.userInfo.id
                }
            },{}).then(res=>{
                console.log(res);
                if (res.data.status.statusCode === 0) {
                    this.result = res.data.result;
                }
            }).catch(err=>{
                console.log(err)
            })
        }
    },
    created(){
        this.$nextTick(()=>{
            this.getAxios()
        })
    }
}
</script>

<style lang="scss" scoped>
.claify{
    width: 100%;
    .title{
        height: 0.435rem;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        color: #030303;
        font-size: 0.18rem;
        .back{
            position: absolute;
            left:0.14rem;
            bottom: 0.1rem; 
            width: 0.1rem;
            height: 0.18rem;;
        }
        &::after{
            content: "";
            position: absolute;
            width: 100%;
            left: 0;
            bottom: 0;
            background: #ccc;
            height: 1px;
            transform:scale(1,0.5) 
        }
    }
    .zhuan{
        width: 100%;
        height: 0.5rem;
        padding: 0.14rem 0.1rem 0.14rem 0.05rem;
        box-sizing: border-box;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        position: relative;
        .zi{
            font-size: 0.12rem;
            color: #333;
        }
        .zh-img{
            width: 0.075rem;
            height: 0.14rem;
            position: absolute;
            right: 0.14rem;
            top: 0.2rem;
        }
    }
}
</style>

